home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 676-700 / 677 / mostra / mostra.tex < prev    next >
Text File  |  1995-03-18  |  20KB  |  414 lines

  1. \font\twelverm=cmr12
  2. \font\twelvett=cmtt12
  3. \twelverm
  4. \font\it=cmti12
  5. \font\bf=cmbx12
  6. \font\ig=cmbx10 scaled\magstep1
  7. \font\big=cmbx10 scaled\magstep3
  8. \font\bigss=cmssdc10 scaled\magstep3
  9. \font\twelvess=cmssdc10 scaled\magstephalf
  10. \def\Mostra{{\twelvess Mostra}}
  11. \centerline{\big Mostra 1.07}
  12. \vskip 1cm
  13. \centerline{\big A Universal IFF Viewer}
  14. \vskip 1cm
  15. \centerline{\ig \copyright\ 1990,1991,1992 Sebastiano Vigna}
  16. \vskip 1cm
  17. \parindent=40pt
  18. \parskip=10pt plus 1pt minus 1pt
  19. \baselineskip=15pt
  20. \noindent There are many utilities for viewing IFF ILBM files, but none I'd seen
  21. until now met the goal of displaying every IFF picture; each had its
  22. idiosyncrasies.  If one viewer could display overscan pictures, then every
  23. picture with more than 640 pixels on a line would be shifted like there were 700
  24. pixels; some programs could only show a directory of pictures by forcing the
  25. user to enter all the filenames; some programs would crash with PAL pictures;
  26. others would do the same with pictures larger than any screen; it was rare to
  27. have an option to force a screen mode (for the tech-folks out there:  old IFF
  28. ILBM files don't have the CAMG chunk!); there were no comfortable file
  29. requesters for use when you didn't know the exact name of the file (who can
  30. remember GRABBiT file names?); pressing the right mouse button could cause a
  31. useless drag bar to corrupt the picture$\ldots$
  32.  
  33. If a program had one feature, it lacked another, so I decided to write a show
  34. utility.  I never would have succeeded without the best friend of an Amiga
  35. programmer:  the ARP library.  If I have been able to write \Mostra, it's only
  36. to ARP's credit.  Pattern matching, resource tracking, powerful resident
  37. functions$\ldots$ The only drawback is that you {\it must\/} have the
  38. arp.library (V39!) in your libs:  directory in order to run \Mostra.  Otherwise,
  39. a message will be displayed, and \Mostra\ will refuse to run. However, the next release of
  40. \Mostra\ will work only under Release 2 and will not need arp.library.
  41. \Mostra\ is a pure program, i.e., it can be made resident.
  42.  
  43. Note that you can run \Mostra\ from Workbench:  called by itself it will pop the
  44. file requester and will show you pictures until you select {\twelvett CANCEL} or
  45. close the file requester window.  Otherwise, you can select multiple icons, or
  46. you can change the default tool of your pictures.  Note that if you do this with
  47. an IFF CAT or LIST you will have an automatic little slideshow.
  48.  
  49. \Mostra\ can process {\it any\/} IFF ILBM file; this means not only IFF ILBM
  50. FORMs, but also nested ILBM, FTXT, FORMs, CATs, LISTs and PROPs!  It will
  51. always try to find the screen type that fits the best, and won't give up if
  52. you want to see 1$\times$1 brushes or {\it very\/} large pictures:  Tom
  53. tried up to 5120$\times$4096 (thanks Tom). In any case, you can force the
  54. screen type with several options.
  55.  
  56. One of the major features in this release is support for multi-palette
  57. pictures, i.e., pictures with the new PCHG chunk which should substitute the
  58. old CTBL and SHAM chunks. See the Changes.doc file for additional
  59. informations. SHAM is still supported, but the support of CTBL pictures via
  60. external call has been dropped since it was shown to be unreliable.
  61.  
  62.  
  63. To get the syntax in AmigaDOS style type:
  64.  
  65. {\obeylines
  66. \parindent=0pt
  67. \twelvett
  68. M ?
  69. \vskip 10pt
  70. \twelverm
  71. This will produce the input template:
  72. \vskip 10pt
  73. \twelvett
  74. {\parskip=0pt Files/$\ldots$,A=All/S,R=Repeat/S,Q=Quiet/S,NoFastDraw/S,
  75. C=Center/S,B=BlackBackground/S,W=Width/K,H=Height/K,Cycle/S,
  76. Secs/K,Fade/K,NO=NoStartup/S,Batch/K,LockPic/S,
  77. N=NoMouse/S,F=FreeMouse/S,LockKeys/S,NA=NoActivate/S,DB=DoubleBuffering/S,
  78. Hires/S,Lace/S,Lores/S,NoLace/S,HAM/S,Halfbrite/S}
  79. \vskip 10pt
  80. \twelverm
  81. If you ask for more help by typing `?' again, you will see:
  82. \vskip 10pt
  83. \twelvett
  84. {\parskip=0pt \Mostra\ 1.06 \copyright\ 1990,1991,1992 Sebastiano Vigna
  85. Usage: M <wildcards [...] | !> [All] [Repeat] [Quiet] [NoFastDraw]
  86. [Center] [BlackBackground] [Width n] [Height n] [Cycle]
  87. [Secs time] [Fade speed] [NoStartup] [Batch file] [LockPic]
  88. [NoMouse] [FreeMouse] [LockKeys] [NoActivate] [DoubleBuffering]
  89. [Hires | Lores] [Lace | NoLace] [HAM | Halfbrite]}
  90. \vskip 10pt
  91. \twelverm
  92. The same help is displayed if you call \Mostra\ with no arguments.
  93. }
  94.  
  95. \Mostra's first argument is a list of patterns (or file names) as long as you
  96. want; you will get every picture whose name matches one of the patterns.
  97.  
  98. Alternatively, you can type only the `!' character, and \Mostra\ will display
  99. the famous Heath File Requester, allowing you to scan the entire file system.
  100.  
  101. When you're tired of looking at the picture, move the mouse pointer to the very
  102. top of the screen and press the right button (you can also press the {\twelvett
  103. RETURN}, {\twelvett SPACE} or {\twelvett ESCAPE} keys).  You can drag or depth-
  104. arrange the screen with the left mouse button (the gadgets are invisible, but
  105. they really are there!).  {\twelvett TAB} will toggle on/off color cycling.  To
  106. stop pattern matching or IFF scanning use {\twelvett CTRL-C} at any moment.
  107.  
  108. If the screen size is less than the size of the picture, you can move around
  109. with cursor keys by themselves (moving by 8 pixels) or in combination with the
  110. {\twelvett SHIFT} (a screenful minus 16 pixels), {\twelvett ALT} (which
  111. brings you to the borders), or
  112. {\twelvett CTRL} (16 pixels) keys.  A noteworthy feature of
  113. \Mostra\ is that the picture is {\it not\/} decrunched all at one time in a very
  114. large chunk of memory; instead, a fast LM routine decrunches the file in
  115. real-time every time you move (the routine could be faster, but it has lots of
  116. controls to get rid of damaged IFF BODY chunks; safety always first).  This is
  117. not as fast as the memory-eating method, but I think it's {\it much\/} better!
  118. Very large pictures (like 800$\times$900) will be shown in a full screen
  119. (generated on the fly at Workbench size) which you can move around.  Overscan
  120. pictures will retain their size of it's not greater than 362$\times$283 lo-res
  121. pixels (362$\times$241 on a NTSC Amiga).  For hi-res pictures, there is also a
  122. 704 pixel width limit due to Intuition (724 under Release 2).  Small brushes
  123. will be shown in a minimum 256$\times$128 pixel screen.  Of course, moving
  124. vertically with multi-palette pictures involves a high system overhead,
  125. since CopperLists are continuously built and deleted.
  126.  
  127. A weird effect of this method is that you can see pictures that can't even be
  128. {\it loaded\/} into your Amiga.  Let's suppose you have a really crunched
  129. picture; the BODY chunk and a 256$\times$256 lo-res screen could take much less
  130. space than the decrunched picture, so you could create pictures that only
  131. \Mostra\ could let you see in all of their parts.  Why you would want to do
  132. this, well, that's another matter.
  133.  
  134. \medskip
  135. Then we have a lot of options (parentheses show how to shorten 'em):
  136.  
  137. \item{$\bullet$}{\twelvett ALL (A)} recursively scans all of the subdirectories
  138. during the wildcard search.
  139.  
  140. \item{$\bullet$}{\twelvett REPEAT (R)} will endlessly restart from the first
  141. pattern when it has finished with the last; if you used the `!' line arguments,
  142. the file requester will pop up after every picture until you {\twelvett CANCEL}
  143. or close.
  144.  
  145. \item{$\bullet$}{\twelvett QUIET (Q)} turns off all messages except in case of
  146. error.
  147.  
  148. \item{$\bullet$}{\twelvett NOFASTDRAW} leaves the program at priority 0; by
  149. default, \Mostra\ will surround the BODY decrunching operations with a
  150. SetTaskPri(1).  This will not lock the system, but in a multitasking situation
  151. \Mostra\ will perform quickly when needed.
  152.  
  153. \item{$\bullet$}{\twelvett CENTER (C)} will force the screen to be centered
  154. (640$\times$200 pictures on PAL screens look so ugly$\ldots$) and will use
  155. overscan if necessary.
  156.  
  157. \item{$\bullet$}{\twelvett BLACKBACKGROUND (B)} will create a 0-bitplane (almost
  158. no memory consumed!) black screen that will stay until you saw the last picture.
  159. This is for aesthetic purposes only.
  160.  
  161. \item{$\bullet$}{\twelvett WIDTH} and {\twelvett HEIGHT (W,H)} want an argument
  162. that specifies the dimensions of the viewing screen.  However, \Mostra\ is an
  163. intelligent program, and will almost always find the correct screen by itself.
  164. WARNING:  dimensions allowed are from 64 to 1024, at your own risk.  Your Amiga
  165. won't crash, but weird things can happen$\ldots$
  166.  
  167. \item{$\bullet$}{\twelvett CYCLE} will automatically activate color cycling on
  168. every picture.  Usually this happens only by request, through {\twelvett TAB}.
  169.  
  170. \item{$\bullet$}{\twelvett SECS} must be followed by a number between 0 and 1000
  171. (the zero delay was a request from a BIXen).  \Mostra\ will display the picture
  172. for the number of seconds specified, but you can skip it with mouse, {\twelvett
  173. RETURN}, {\twelvett SPACE}, and {\twelvett ESCAPE} keys as always or stop the
  174. show with {\twelvett CTRL-C}.  Cursor keys are disabled.  Greatly reworked on
  175. Warren's request.
  176.  
  177. \item{$\bullet$}{\twelvett FADE} lets you specify a speed for pictures to fade
  178. in and out.  Valid numbers are 1 to 4, with four the slowest.  Note that HAM
  179. pictures can't be faded.
  180.  
  181. \item{$\bullet$}{\twelvett NOMOUSE (N)} will hide the mouse pointer while
  182. \Mostra\ is displaying a picture.
  183.  
  184. \item{$\bullet$}{\twelvett FREEMOUSE (F)} will let you pass from one picture to
  185. another by clicking either of the mouse buttons at any position on the screen.
  186.  
  187. \item{$\bullet$}{\twelvett LOCKKEYS} will discard any input from the
  188. keyboard during the display.  You must use the mouse to pass to the
  189. following picture.  Note that if {\twelvett FREEMOUSE} is not
  190. activated, the only way to go is clicking the right mouse button while
  191. the mouse pointer is at the top of the screen.
  192.  
  193. \item{$\bullet$}{\twelvett LOCKPIC} will lock the picture displayed.  You won't
  194. be able to scroll around, but the memory in which the file is loaded will be
  195. immediately freed after the decompression, thus minimizing the memory usage.
  196.  
  197. \item{$\bullet$}{\twelvett NOACTIVATE (NA)} will inhibit the activation of the
  198. picture screens, so you can keep on typing on your current screen.  This was a
  199. request from Tom.
  200.  
  201. \item{$\bullet$}{\twelvett DOUBLEBUFFERING (DB)} sets a double buffering show
  202. mode:  while a new picture is being loaded you see the old one, no Workbench
  203. pop-up or black screens.  Eats lots of memory, too.  Again, a request from Tom.
  204. (Note:  it's canceled if you call the file requester.)
  205.  
  206. Centering is no longer performed via Preferences, so if you move the screen the
  207. centering will go away.  {\twelvett NOSTARTUP} and {\twelvett BATCH} options
  208. will be discussed later.
  209.  
  210. Now, the graphics options.  You can force all screens to be {\twelvett HIRES} or
  211. {\twelvett LORES}, {\twelvett LACE} or {\twelvett NOLACE}, {\twelvett HAM} or
  212. {\twelvett HALFBRITE}.  Note that if \Mostra\ finds a six bitplane picture with
  213. no indications (no CAMG chunk), it won't set the {\twelvett HAM} flag by
  214. default.  These flags are ``dumb,'' that is, they'll do exactly what you say,
  215. even if it is meaningless.  However, if you use both {\twelvett HALFBRITE} and
  216. {\twelvett HAM} together, only the former will take place.
  217.  
  218. And now, some examples:
  219.  
  220. \twelvett
  221. M MyPics:* SECS 5 FADE 1 NOMOUSE BLACKBACKGROUND REPEAT CENTER ALL
  222.  
  223. \twelverm
  224.  
  225. \noindent will generate a real (and endless!) slide show of the pictures in the
  226. MyPics:  dir and in all its subdirs, centered and with no mouse pointer hanging
  227. around.  In order to stop the slide show, you must press {\twelvett CTRL-C}.
  228.  
  229. \twelvett
  230. M df0:*.image df0:pictures/*.pic HIRES LACE
  231.  
  232. \twelverm
  233. \noindent will show the files ending with .image on the drive df0:  and the
  234. files ending with .pic in the directory df0:pictures.  \Mostra\ will be forced
  235. to use high resolution, interlaced screens.  Setting the {\twelvett HIRES} flag
  236. on pictures with more than 4 bitplanes usually leads you to see absolutely
  237. nothing.
  238.  
  239. \twelvett
  240. M dh0:hirespic LORES NOLACE
  241.  
  242. \twelverm
  243. \noindent will show a hi-res picture in lo-res (`zooming in').  You can move
  244. around with the cursor keys as described above.
  245.  
  246. {\twelvett WIDTH} and {\twelvett HEIGHT} can be useful when you have a picture
  247. that cannot be displayed because there's not enough Chip RAM (you get the
  248. ``Can't open Screen'' error message).  In such a case, try:
  249.  
  250. \twelvett
  251. M pic WIDTH 128 HEIGHT 128
  252.  
  253. \twelverm
  254. \noindent This will usually allow you to at least get a peek at something.
  255.  
  256.  
  257. \vskip 1.5cm
  258. \centerline{\big Advanced features}
  259. \vskip 0.5cm
  260.  
  261.  
  262. \noindent For maximum flexibility, \Mostra\ allows you to use ``startup'' files
  263. and ``startup'' Tool Types, with which you can configure the program to suit your
  264. tastes.
  265.  
  266. There is a standard startup file, called `S:Startup-Mostra'.  \Mostra\ will
  267. search for it when run from CLI.  The format of this file is {\it exactly\/} the
  268. same as the \Mostra\ line format minus the command name ({\twelvett M}).
  269. Commands may be spread out over several lines or gathered together onto a single
  270. line.  Every switch or keyword in the startup file will act as a default, and
  271. will be toggled or superseded by any command line arguments.  Command line
  272. switches will act as toggles (if your startup file has the keyword {\twelvett
  273. ALL} and you say {\twelvett M * ALL}, you {\it won't\/} go into subdirectories),
  274. while keywords simply assert the new value (if you have {\twelvett FADE 1} in
  275. your startup file and you say {\twelvett FADE 3} in the command line, your
  276. pictures will be faded at speed 3).
  277.  
  278. Two options concern startup files:
  279.  
  280. \item{$\bullet$}{\twelvett NOSTARTUP} inhibit the search for startup files,
  281. useful if you have one of them and you want to specify your options from
  282. scratch; it can be shortened with {\twelvett NO}.
  283.  
  284. \item{$\bullet$}{\twelvett BATCH} wants a complete path/filename that \Mostra\
  285. will use as startup file.
  286.  
  287. From the WB side, you can write the startup options in the Tool Types of the
  288. \Mostra\ icon, and it will use them.  The format is the same of
  289. `Startup-Mostra'.  Please note that {\twelvett FADE=1}, {\twelvett WIDTH=352}
  290. are valid, but {\twelvett FREEMOUSE=ON} is not; use only {\twelvett FREEMOUSE}.
  291.  
  292. Or you can set the first Tool Type of a project icon to {\twelvett STARTUP} and
  293. put your options in the following lines; the project picture file will be shown
  294. with those options when you double-click its icon.  You can do the same thing
  295. with an icon that has no related file, and put some wildcards in the Tool Type.
  296. The wildcards will then be shown with those options.  If you don't put in
  297. wildcards, you get a ``style'' icon:  you can {\twelvett SHIFT} click some
  298. icons, {\twelvett SHIFT} click the ``style'' icon (in {\it this\/} order) and
  299. then {\twelvett SHIFT} double-click the \Mostra\ icon (or directly {\twelvett
  300. SHIFT} double-click the last icon, if its default tool is \Mostra):  you will
  301. see the selected picture files with the options specified in the style icon.
  302. The style icon by itself will pop up the file requester.  Please note that even
  303. an icon with wildcards can be used as a style icon because multiple selections
  304. supersede wildcards.
  305.  
  306. I know, it seems a little twisted, but using it you'll find, instead, that it's
  307. the way you'd think.
  308.  
  309. {\bf WARNING}:  strange interactions can take place.  If you have some picture
  310. icons, and you {\twelvett SHIFT} click all but one of them and then you
  311. {\twelvett SHIFT} double click the last {\it and\/} the last picture icon you
  312. clicked had some {\twelvett STARTUP} options, you will see {\it all\/} of the
  313. pictures with those options.  Right?
  314.  
  315. For curious/tech/interested people, here is the exact algorithm:
  316.  
  317. \item{1.} If sm\_NumArgs$>$1 (the user started \Mostra\ with al least an icon
  318. argument), check if sm\_ArgList[1] (the first `real' argument) has Tool Types
  319. with first Tool Type = {\twelvett STARTUP}.  If so, scan the whole Tool Types list
  320. like a command line, accepting mixed commands on a single Tool Type as well as
  321. separated commands in separated Tool Types.
  322.  
  323. \item{2.} If 1.\ goes wrong, check the \Mostra\ icon Tool Types, and take them as
  324. a command line.  (Note:  {\twelvett STARTUP} is not requested.)
  325.  
  326. \item{3.} Now, if sm\_NumArgs$>$1, check every sc\_ArgList[i] with i$>$0 and if
  327. there is a related file ({\it not\/} a .info file!) generate a list of arguments
  328. as if the user entered them manually, {\it superseding\/} eventual
  329. filenames/wildcards found in 1.\ and 2.
  330.  
  331.  
  332. \noindent Now, examples, by means of common problems:
  333.  
  334.  
  335. \item{1.} ``I have a hundred pictures on my 360M hard disk, and I've organized
  336. them in a few groups.  How can I make simple slideshows, with each group
  337. separate?''
  338.  
  339. Simple:  Create a project icon for each group, and add a Tool Type {\twelvett
  340. STARTUP}.  Then add a Tool Type like {\twelvett PICS:Group1/* ALL SECS 5 CENTER}
  341. to choose your options, set the default tool to {\twelvett C:M} (or wherever you
  342. put it) and double-click (of course, this must be done with every group icon).
  343. Don't give the icons the same name as a directory, or \Mostra\ will collapse in
  344. confusion.
  345.  
  346.  
  347. \item{2.} ``I want to always see the black screen when I start from WB.''
  348.  
  349. Set a \Mostra\ Tool Type to {\twelvett BLACKBACKGROUND}.
  350.  
  351.  
  352. \item{3.} ``I have some pictures.  Sometimes I want to see a few of them with a
  353. full screen and no mouse, sometimes with a 128$\times$128 screen, sometimes
  354. centered.''
  355.  
  356. Create three ``style'' icons.  Each icon must have as its first Tool Type
  357. {\twelvett STARTUP}, and the following ones must be something like {\twelvett
  358. NOMOUSE}, {\twelvett WIDTH 128 HEIGHT 128} and {\twelvett CENTER}.  The default
  359. tool must be {\twelvett C:M}.  When you want to see in a certain style,
  360. {\twelvett SHIFT} click the picture icons and {\it then\/} {\twelvett SHIFT}
  361. double-click the style icon you desire.
  362.  
  363.  
  364. \item{4.} ``I like to click my pics one at a time, each one with different
  365. options.  I'd like also to see them in irregular groups, each picture with its
  366. options.''
  367.  
  368. You need a psycho-analyst, not \Mostra.
  369.  
  370.  
  371. \vskip 1.5cm
  372. \centerline{\big Acknowledgments}
  373. \vskip 0.5cm
  374.  
  375. I wish to thank some people, first of all the ARP team for the arp.library
  376. and the SAS team for the best Amiga C compiler. Speed and compactness of
  377. \Mostra\ come from the fabulous 5.10b release. Also I would like to thank the
  378. people that encouraged me someway or helped me to find bugs, in particular
  379. Warren Block, Tom Rokicki, Christopher A. Wichura and Loren Wilton.
  380.  
  381. If you're reading this, you probably have access to a \TeX\ system.  Anyway, if
  382. you spent a good part of your time preparing and printing documents, I'd suggest
  383. you to take a look at Amiga\TeX, a wonderful package from Radical Eye Software
  384. which is probably the best implementation of \TeX\ you can
  385. find on any computer.
  386.  
  387. \Mostra\ is \copyright\ 1990,1991,1992 Sebastiano Vigna and it's not public
  388. domain: it is shareware. You should send me \$20 (or more, why not?) if you find
  389. it useful.  Please don't send checks drawn on a US bank, they're almost
  390. impossible to cash.  I'd prefer postal money orders, currency or checks drawn
  391. on an italian bank (in this order). \Mostra\ is freely distributable as long as
  392. all of its files are included in their original form without additions,
  393. deletions, or modifications of any kind, and only a nominal fee is charged for
  394. its distribution. This software is provided ``AS IS'' without warranty of any
  395. kind, either expressed or implied. By using \Mostra, you agree to accept the
  396. entire risk as to the quality and performance of the program.
  397.  
  398. Comments, complaints, desiderata are welcome.
  399.  
  400. \vskip 1cm
  401. {\obeylines\parskip=0pt
  402. \twelvett
  403.  
  404.     Sebastiano Vigna
  405.     Via Valparaiso 18
  406.     I-20144 Milano MI
  407. \vskip 0.5cm
  408.     BIX: svigna
  409.     INTERNET: vigna@imiucca.csi.unimi.it
  410.     UUCP:cbmehq!cbmita!sebamiga!seba@cbmvax.cbm.commodore.com
  411.          ...$\{$uunet$|$pyramid$|$rutgers$\}$!cbmvax!cbmehq!cbmita!sebamiga!seba
  412.     FIDO: 2:332/607.28
  413. \bye
  414.